package view;
import pond.common.FILE;
import pond.common.S;
import pond.common.PATH;
import pond.db.DB;
import pond.db.connpool.ConnectionPool;
import pond.web.InternalMids;
import pond.web.Pond;

import java.io.File;
/**
 * Created by sky_wang on 2017/4/7.
 */
public class App {

    public static final DB DB = new DB(ConnectionPool.c3p0(FILE.loadProperties("db.conf")));

    public  static  void main (String args[]){
        Pond.init(app -> {
//            app.get("/*", (req, resp) -> {
//                S.echo(req.uri());
//                if (req.uri().endsWith("/123"))
//                    resp.send(200, "OK");
//            });
            //app.use("/report_view/*", ReportView.server("report_view",FILE.loadProperties("db.conf"), 1));
            app.get("/*",  app._static("web"));
            app.otherwise(InternalMids.FORCE_CLOSE);
        }).listen(1234);

    }
}